<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>IE缓存</title>
    <style>
        #result {
            width: 200px;
            height: 200px;
            border: 2px solid darkred;
        }
    </style>
</head>
<body>
    <button>IECACHE</button>
    <div id="result"></div>
<script>
    const btn = document.getElementsByTagName("button")[0];
    const res = document.getElementById("result");
    btn.addEventListener('click', function () {
        const xhr = new XMLHttpRequest();
        xhr.open('GET', 'http://localhost:8080/ie-cache?a='+Date.now());
        xhr.send();
        xhr.onreadystatechange = function () {
            if (xhr.readyState === 4) {
                if (xhr.status >= 200 && xhr.status < 300) {
                    res.innerHTML = xhr.response;
                }
            }
        }
    });
</script>
</body>
</html>